//
//  DLPageNavControlView.h
//  DLPageNavControlView
//
//  Created by 伍明鹏 on 2019/12/17.
//

#import <UIKit/UIKit.h>

//#define KStatushight [[UIApplication sharedApplication] statusBarFrame].size.height

@protocol DLPageNavControlViewDelegate <NSObject>

@optional
/**
 * 切换位置后的代理方法
 */
- (void)SelectAtIndex:(NSInteger)index;

@end

@interface DLPageNavControlView : UIView
@property (nonatomic, weak) id <DLPageNavControlViewDelegate>delegate;
/** 默认选择的index */
@property (nonatomic, assign) NSInteger selectedIndex;
/** scrollEnabled 是否支持滑动*/
@property (nonatomic, assign) BOOL scrollEnabled;
/** tintColor */
@property (nonatomic, strong) UIColor* tintColor;
/** 默认状态下字体 */
@property (nonatomic, strong) UIFont *normalFont;
/** 选中状态下字体 */
@property (nonatomic, strong) UIFont *selectFont;

/**初始化方法*/
-(instancetype)initWithFrame:(CGRect)frame Titles:(NSArray <NSString *>*)titles viewControllers:(NSArray <UIViewController *>*)viewControllers Selectindex:(NSInteger)selectedIndex;

/**
 初始化方法
 可控segmentedControl的frame
 */
-(instancetype)initWithFrame:(CGRect)frame Titles:(NSArray <NSString *>*)titles viewControllers:(NSArray <UIViewController *>*)viewControllers Selectindex:(NSInteger)selectedIndex segmentControlFrame:(CGRect)segmentControlFrame;
/**标题显示在NavigationBar中*/
-(void)showInNavigationController:(UINavigationController *)navigationController backgroundColor:(UIColor *)backgroundColor;
@end
